import type { Metadata } from "next"
import { ThemeProvider } from "@/components/custom/ThemeProvider"
import './global.css'
import {ScrollHeader} from "@/components/custom/ScrollHeader";
import {Footer} from "@/components/custom/Footer";
export const metadata: Metadata = {
    title: "My App",
    description: "A modern web application",
}

export default function RootLayout({
                                       children,
                                   }: {
    children: React.ReactNode
}) {
    return (
        // <html lang="zh" suppressHydrationWarning>
        // <body className="min-h-screen bg-background text-foreground">
        <ThemeProvider
            attribute="class"
            defaultTheme="system"
            enableSystem
            disableTransitionOnChange
        >
            {/* 可滚动隐藏的Header */}
            <ScrollHeader />

            {/* 主要内容区域 */}
            <main className="container flex-1 mx-auto">
                {children}
            </main>

            {/* 页脚 */}
            <Footer
                author="张三"
                email="zhangsan@example.com"
                github="https://github.com/zhangsan"
                twitter="https://twitter.com/zhangsan"
                linkedin="https://linkedin.com/in/zhangsan"
                className="mt-20"  // 自定义顶部间距
            />
        </ThemeProvider>
        // </body>
        // </html>
    )
}
